$(function () {
    //Parsley Form Validation
    //While the JS is not usually required in Parsley, we will be modifying
    //the default classes so it plays well with Bootstrap
    $('.validate-needed-form').each(function () {
        console.log(this);
    });
    $('.validate-needed-form').parsley({
        successClass: 'has-success',
        errorClass: 'has-error',
        errors: {
            classHandler: function (el) {
                return $(el).closest('.form-group');
            },
            errorsWrapper: '<ul class=\"help-block list-unstyled\"></ul>',
            errorElem: '<li></li>'
        }
    });
    $('#myTab').on('shown.bs.tab', function (e) {
        e.target // activated tab
        // e.relatedTarget // previous tab
        console.log(e.target);
    })

});